package gestionTransportObjetsGenerated;

/**
 * Interface definition : GestionAdherent
 * 
 * @author OpenORB Compiler
 */
public class _GestionAdherentStub extends org.omg.CORBA.portable.ObjectImpl
        implements GestionAdherent
{
    static final String[] _ids_list =
    {
        "IDL:gestionTransportObjetsGenerated/GestionAdherent:1.0"
    };

    public String[] _ids()
    {
     return _ids_list;
    }

    private final static Class _opsClass = gestionTransportObjetsGenerated.GestionAdherentOperations.class;

    /**
     * Operation identifierUser
     */
    public gestionTransportObjetsGenerated.Adherent identifierUser(String numAdh)
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("identifierUser",true);
                    _output.write_string(numAdh);
                    _input = this._invoke(_output);
                    gestionTransportObjetsGenerated.Adherent _arg_ret = gestionTransportObjetsGenerated.AdherentHelper.read(_input);
                    return _arg_ret;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("identifierUser",_opsClass);
                if (_so == null)
                   continue;
                gestionTransportObjetsGenerated.GestionAdherentOperations _self = (gestionTransportObjetsGenerated.GestionAdherentOperations) _so.servant;
                try
                {
                    return _self.identifierUser( numAdh);
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation getAdherent
     */
    public gestionTransportObjetsGenerated.Adherent getAdherent(String numAdh)
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("getAdherent",true);
                    _output.write_string(numAdh);
                    _input = this._invoke(_output);
                    gestionTransportObjetsGenerated.Adherent _arg_ret = gestionTransportObjetsGenerated.AdherentHelper.read(_input);
                    return _arg_ret;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("getAdherent",_opsClass);
                if (_so == null)
                   continue;
                gestionTransportObjetsGenerated.GestionAdherentOperations _self = (gestionTransportObjetsGenerated.GestionAdherentOperations) _so.servant;
                try
                {
                    return _self.getAdherent( numAdh);
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation inscrireUser
     */
    public gestionTransportObjetsGenerated.Adherent inscrireUser(gestionTransportObjetsGenerated.Adherent adh)
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("inscrireUser",true);
                    gestionTransportObjetsGenerated.AdherentHelper.write(_output,adh);
                    _input = this._invoke(_output);
                    gestionTransportObjetsGenerated.Adherent _arg_ret = gestionTransportObjetsGenerated.AdherentHelper.read(_input);
                    return _arg_ret;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("inscrireUser",_opsClass);
                if (_so == null)
                   continue;
                gestionTransportObjetsGenerated.GestionAdherentOperations _self = (gestionTransportObjetsGenerated.GestionAdherentOperations) _so.servant;
                try
                {
                    return _self.inscrireUser( adh);
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation verifierAdhDest
     */
    public gestionTransportObjetsGenerated.Adherent[] verifierAdhDest(String nomDest)
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("verifierAdhDest",true);
                    _output.write_string(nomDest);
                    _input = this._invoke(_output);
                    gestionTransportObjetsGenerated.Adherent[] _arg_ret = gestionTransportObjetsGenerated.DestinatairesHelper.read(_input);
                    return _arg_ret;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("verifierAdhDest",_opsClass);
                if (_so == null)
                   continue;
                gestionTransportObjetsGenerated.GestionAdherentOperations _self = (gestionTransportObjetsGenerated.GestionAdherentOperations) _so.servant;
                try
                {
                    return _self.verifierAdhDest( nomDest);
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

}
